<include file="common/hearder"/>

            <div class="page-header">
                <div class="pull-left">
                    <h4><span class="glyphicon glyphicon-tag"></span>招聘管理回收站\Recruitment management recycling station</h4>
                </div>
            </div>
            <div class="pull-right">
                <form action="{:U('Recycle_bin')}" method="post">
                    <input type="text" name="tj" placeholder="输入‘标题’查询">
                    <button type="submit"  class="btn btn-mystyle btn-sm"><span class="glyphicon glyphicon-search"></span>搜索</button>
                </form>
            </div>
            <div class="manage-left">
                <a onclick="$('#form_all').submit();" class="btn btn-info glyphicon glyphicon glyphicon-trash">恢复数据</a>
                <a href="{:U('index')}" class="btn btn-warning glyphicon glyphicon glyphicon glyphicon-share-alt">返回</a>
            </div>
            <div class="clearfix"></div>
            <div class="table-margin">
                <form action="{:U('Recycle_add')}" method="post" id="form_all">
                <table class="table table-bordered table-header">
                    <thead>
                    <tr>
                        <td class="w5"><input class="ch_all" type="checkbox"></td>
                        <td class="w5">ID</td>
                        <td class="w10">标题</td>
                        <td class="w10">开始时间</td>
                        <td class="w10">结束时间</td>
                        <td class="w10">发布人</td>
                        <td class="w10">状态</td>
                    </tr>
                    </thead>
                    <tbody>
                    <foreach name="list" item="v">
                    <tr>
                        <td><input name="id[]" value="{$v.rct_id}" type="checkbox" class="ch_id"></td>
                        <td>{$v.rct_id}</td>
                        <td>{$v.rct_title}</td>
                        <td>{$v.rct_starttime}</td>
                        <td>{$v.rct_endtime}</td>
                        <td><?php
                            foreach($listid as $id){
                              if($id['stf_id']==$v['pubmen']){
                                echo $id['stf_name'];
                              }
                            }
                        ?></td>
                        <td>
                            <?php
                                   $showtime=date("Y-m-d H:i:s");

                                   if(strtotime($showtime)<strtotime($v['rct_starttime'])){
                                        echo '<span style="color:#316480;">未开启</span>';
                                    }elseif(strtotime($v['rct_starttime'])<strtotime($showtime)&&strtotime($showtime)<strtotime($v['rct_endtime'])){
                                        echo '<span style="color:green;">进行中</span>';
                                   }else{
                                        echo '<span style="color:gray;">已结束</span>';
                                   }
                                ?>
                        </td>
                    </tr>
                    </foreach>
                    </tbody>
                </table>
                </form>
                {$show}
            </div>
        </div>
<script>
    //全选  反选
    $('.ch_all').on('click',function () {
        if($(this).prop('checked')){
            $('.ch_id').each(function () {
                if($(this).prop('checked')){
                    $(this).prop('checked',false);
                }
                else {
                    $(this).prop('checked',true);
                }
            })
        }
        else {
            $('.ch_id').prop('checked',false);
        }
    });
</script>

<include file="common/footer"/>